Skip to content

PostgreSQL: parse CREATE GROUP and DROP GROUP - #2429

Open
LucaCappelletti94 wants to merge 2 commits into
apache:mainfrom
LucaCappelletti94:pg-create-drop-group
Open

LucaCappelletti94 wants to merge 2 commits into
apache:mainfrom
LucaCappelletti94:pg-create-drop-group

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

PostgreSQL accepts GROUP wherever it accepts ROLE in these two statements, but the parser rejected it, so a schema dump containing CREATE GROUP could not be read at all.

The keyword is preserved rather than rewritten to ROLE. It looks like a pure alias in PostgreSQL, but Amazon Redshift has user groups as objects distinct from roles, so folding the two would change what the statement means there.

I will also add ALTER GROUP in a following PR, so as to keep this one smaller.

@LucaCappelletti94
LucaCappelletti94 marked this pull request as ready for review August 5, 2026 14:13
@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-create-drop-group branch 2 times, most recently from a81ad93 to eb95863 Compare August 24, 2026 11:52
@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-create-drop-group branch 4 times, most recently from 12418e2 to bc8d980 Compare September 22, 2026 21:20
LucaCappelletti94 added a commit to LucaCappelletti94/sqlparser-rs that referenced this pull request Oct 2, 2026
@codecov-commenter

codecov-commenter commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.32%. Comparing base (ada8314) to head (ddda956).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2429      +/-   ##
==========================================
+ Coverage   81.28%   81.32%   +0.04%     
==========================================
  Files          42       42              
  Lines       33920    33945      +25     
  Branches    33920    33945      +25     
==========================================
+ Hits        27571    27605      +34     
+ Misses       2785     2773      -12     
- Partials     3564     3567       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-create-drop-group branch 3 times, most recently from 2ed5332 to a99e919 Compare October 17, 2026 01:00
@LucaCappelletti94 LucaCappelletti94 added the enhancement New feature or request label Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PostgreSQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants